home *** CD-ROM | disk | FTP | other *** search
/ Star Festival... a Return to Japan / Star Festival... a Return to Japan.iso / pc / STARFESTIVAL / Shared.Cst / 00001.ls next >
Encoding:
Text File  |  1999-10-10  |  3.5 KB  |  138 lines

  1. -- sharedStartMovie
  2.  
  3. global firsttime
  4. global lasttime
  5. global GSFpathname
  6.  
  7. on sharedStartMovie
  8.   
  9.   -- This is called by one parent movie, here called "StarFest.Dir"
  10.   
  11.   -- Reset everything
  12.   set the mouseDownScript to EMPTY
  13.   set the mouseUpScript to EMPTY
  14.   
  15.   -- Assign globals
  16.   set firsttime = 0
  17.   
  18.   --showGlobals
  19.   
  20.   -- Disallow the user from quitting to finder without going
  21.   --  through the presumed exit handler
  22.   --set the exitLock to TRUE
  23.   
  24.   if( firsttime = 0) then  -- i.e. firsttime is uninited
  25.     
  26.     set firsttime = 1  -- will not make another handler
  27.     
  28.     -- Check for MacOS version
  29.     --  checkMacOSVersion()
  30.     
  31.     -- Check for JLK version
  32.     --  checkJLKVersion()
  33.     
  34.     -- Check for QT version on Mac only
  35. --    if ( the machineType <> 256 ) then
  36. --      checkQtVersion()
  37. --    end if
  38.     
  39.     -- Check for color depth
  40.     checkColorDepth()
  41.     
  42.   else  -- firsttime not 0, second time
  43.     nothing
  44.   end if  -- firsttime test
  45.   
  46.   -- lasttime should be set to zero for a movie that expects to
  47.   --  play another
  48.   set lasttime = 0  -- will not remove handler on stop movie
  49.   
  50.   set GSFpathname = the pathname
  51.   initFieldNotes()
  52.   
  53.   
  54. end sharedStartMovie
  55.  
  56. ------------------------------------------------------------------------
  57.  
  58. --on checkQtVersion
  59. --  global gUserDepth
  60. --  
  61. --  -- "OpenXLib" is needed if the XFCN is NOT installed in the
  62. --  --  resource fork of the movie using ResEdit.
  63. --  OpenXLib the pathName & "QTVersion.XFCN"
  64. --  
  65. --  set vsnString = QTVersion()
  66. --  
  67. --  put
  68. --  set outString1 = "Your QuickTime version is" && vsnString
  69. --  
  70. --  set outString2 = "version"
  71. --  set outStringW = outString2 && "2.1"
  72. --  
  73. --  set iversion = integer(chars(vsnString,1,1))
  74. --  set csubvrsn = chars(vsnString,3,3)
  75. --  if ((iversion  < 2 ) or ((iversion  = 2 ) and not (( csubvrsn = "1")  or ( csubvrsn = "5" )))) then
  76. --    
  77. --    set outString3 = outString1  & ". StarFest requires" && outStringW && ¬¨
  78. --      "or later.  Please find QT 3 on the CD and install it." ¬¨
  79. --      & RETURN & RETURN && "StarFest will exit on OK."
  80. --    alert ( outString3 )
  81. --    set the colorDepth to gUserDepth
  82. --    quit    
  83. --    
  84. --  else
  85. --    put outString1
  86. --  end if
  87. --  
  88. --  -- "CloseXLib" is needed if the XFCN is NOT installed in the
  89. --  --  resource fork of the movie using ResEdit.
  90. --  CloseXLib the pathName & "QTVersion.XFCN"
  91. --  
  92. --end checkQtVersion
  93.  
  94. ------------------------------------------------------------------------
  95.  
  96. on checkColorDepth
  97.   global gUserDepth
  98.   set gUserDepth = the colorDepth
  99.   -- Note Lingo dict:"When you assign a monitor a colorDepth higher than
  100.   --  the monitor's color depth, the monitor becomes set to its maximum
  101.   --  color depth." 
  102.   if ( the colorDepth <> 16 ) then
  103.     alert ( "StarFest is attempting to set your monitor's color depth " & ¬¨
  104.       "to 16 bits (Thousands)." & RETURN & RETURN & ¬¨
  105.       "It will be returned to the original depth upon exit." )
  106.     set the colorDepth to 16
  107.   end if
  108.   -- exit
  109. end checkColorDepth
  110.  
  111. ------------------------------------------------------------------------
  112.  
  113. on sharedStopMovie
  114.   global gUserDepth
  115.   put "SHAREDSTOP lasttime" &&lasttime
  116.   -- lasttime should be set to zero for a movie that expects to
  117.   --  play another
  118.   if lasttime = 1 then
  119.     
  120.     set the colorDepth to gUserDepth
  121.     
  122.   end if
  123.   
  124. end sharedStopMovie
  125. ------------------------------------------------------------------------
  126.  
  127. on mailHandler
  128.   
  129.   puppetSound "plop"
  130.   
  131.   set the visible of sprite 34 = 1
  132.   updateStage
  133.   
  134.   when timeout then nothing
  135.   
  136. end
  137. --
  138.